{% load url from future %}
<!DOCTYPE HTML>
<html lang="ru">
 <head>
   <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
   <title>{% block title %}{% endblock %}</title>
   <link rel="stylesheet" href="{{ STATIC_URL }}css/main.css" type="text/css" />
 </head>
<body>
  <header>
    <a id="logo" href="/"><span id="logo-img">FLCKR</span></a>
    <a id="gallery-list-url" href="{% url 'gallery_list' %}">Список галерей</a>
    <div id="user-nav">
      {% if user.is_authenticated %}
        Привет, <a href="{% url 'gallery' username=user.username %}"!>{{ user.username }}</a>! 
        <a href="{% url 'messages_inbox' %}">Входящие</a> |
        <a href="{% url 'photo_add' %}">Добавить фото</a> | 
        <a href="{% url 'django.contrib.auth.views.password_change' %}">Сменить пароль</a> | 
	<a href="{% url 'django.contrib.auth.views.logout' %}?next=/">Выйти</a>
      {% else %}
        <a href="{% url 'django.contrib.auth.views.login' %}">Войти</a> или
	<a href="{% url 'registration_register' %}">Зарегистрироваться</a>
      {% endif %}
    </div>
  </header>
  <nav id="subnav">
    {% block nav %}{% endblock %}
  </nav>

  <div id="content">
  {% block content %}
  {% endblock %}
  </div>
</body>
</html>
